package ConCom.test2;

import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

public class ReduceTest extends Reducer<Text, Text, Text, Text> {
    Text head = new Text(Count.header);

    @Override
    protected void reduce(Text key, Iterable<Text> values, Reducer<Text, Text, Text, Text>.Context context) throws IOException, InterruptedException {
        context.write(new Text(), head);
        System.out.println("===删除的个数为"+Count.count+"===");
        for (Text value : values) {
            context.write(new Text(), value);
        }
    }
}
